# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=bunny
pkgver=0.93
pkgrel=6
pkgdesc='A closed loop, high-performance, general purpose protocol-blind fuzzer for C programs.'
url='https://code.google.com/p/bunny-the-fuzzer/'
depends=('openssl')
groups=('blackarch' 'blackarch-fuzzer')
license=('GPL')
arch=('x86_64')
source=("https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/bunny-the-fuzzer/$pkgname-$pkgver.tgz")
sha512sums=('275eadd58e75b6bc626cc599447b723ff062281f93c7d98159abf6a65ae70d3588435c514ee809dd19e013d8299ec9f9cdfee776ff03ec6c0478b02752d45392')

build() {
  cd $pkgname

  make
}

package(){
  cd $pkgname

  install -dm 755 "$pkgdir/usr/bin"
  install -dm 755 "$pkgdir/usr/share/$pkgname"
  install -dm 755 "$pkgdir/usr/share/doc/$pkgname"

  install -m 644 CHANGES README "$pkgdir/usr/share/doc/$pkgname"
  install -m 755 bunny-{exec,flow,gcc,main,trace} "$pkgdir/usr/bin"

  cp -a --no-preserve=ownership datasets "$pkgdir/usr/share/$pkgname"

  chmod a+rX "$pkgdir"/*
}

